package demo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data //
@AllArgsConstructor
@NoArgsConstructor
public class Card
{

    private String carid;
    private String name;
    private String phonenumber;
    private double money;

    public void doposit(double money)
    {
        this.money = this.money + money;
        System.out.println("充值成功！您的余额为"+ this.money);
    }

    public void consume (double money)
    {
        this.money = this.money - money;
        System.out.println("支付成功！您的余额为"+ this.money);
    }

}

